package ru.fadeev.crammer;


/**
 * ProgressBar defines the interface for progress bar. Its used for passing
 * information about some process to GUI. GUI windows implements this interface
 * and passes as a parameter to some long working function. Function updates
 * GUI by calling updatePBValue function.
 * @author Konstantin Fadeyev
 *
 */
public interface ProgressBar {

	/**
	 * Returns progress bar value
	 * @return progress bar value
	 */
	public int getPBValue();
	
	/**
	 * Hides progress bar
	 */
	public void hidePB();
	
	/**
	 * Checks if progress bar is visible.
	 * @return true, if progress bar is visible
	 */
	public boolean isPBVisible();
	
	/**
	 * Update progress bar with new note 
	 * @param note new note of progress bar
	 */
	public void setPBNote(String note);
	
	/**
	 * Shows determinate progress bar with a note and maximum value.
	 * @param max maximum value of progress bar
	 * @param note string note that goes somewhere near (optionally)
	 */
	public void showPBDeterminate(int max, String note);

	/**
	 * Shows indeterminate progress bar with a note 
	 * @param note string note that goes somewhere near (optionally)
	 */
	public void showPBIndeterminate(String note);

	/**
	 * Updates determinate progress bar with some value
	 * @param value new value of progress bar
	 */
	public void updatePBValue(int value);
}
